package cn.hss.object.abstractTest;

/**兼职员工类
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/4/25 17:09
 * @Package 包名：cn.hss.object.abstractTest
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
public class HourlyEmployee extends Employee{
	private double wage;//每小时的工资
	private int hour;//月工作的小时数

	public HourlyEmployee(String name,Integer number,
	                      MyDate birthday,double wage,int hour) {
		super(name, number, birthday);
		this.wage = wage;
		this.hour = hour;
	}

	@Override
	public double earnings() {
		return wage*hour;
	}

	@Override
	public String toString() {
		return "HourlyEmployee["+super.toString() +']';
	}

	public double getWage() {
		return wage;
	}

	public void setWage(final double wage) {
		this.wage = wage;
	}

	public int getHour() {
		return hour;
	}

	public void setHour(final int hour) {
		this.hour = hour;
	}
}